package cn.slipi.admin.common.contants.enumtype;

import java.util.Arrays;

/**
 * 日志类型
 */
public enum AdminLogType {

    /**
     * 1, "登陆日志" , 2, "操作日志"
     */
    LOGIN(0, "登陆日志"),

    OPERATOR(1, "操作日志");

    private Integer value;
    private String desc;

    AdminLogType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static AdminLogType getByValue(int value) {
        return Arrays.stream(AdminLogType.values()).filter((t) -> t.getValue() == value).findFirst().get();
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
